home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene 96
/
Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso
/
tracker
/
amusic11
/
sources
/
asm
/
play_asm.asm
< prev
next >
Wrap
Assembly Source File
|
1995-12-28
|
2KB
|
103 lines
;Playdemo.asm
;(Plays a packed amd)
;
;How to use the player of Amusic (in polling mode!!!)
;6.12.1995 by Conqueror / ε£¥$$ì$
;
;Link this with amdobj.obj!!!
;
EXTRN _InitAdlib : near
EXTRN _AdlibPlayer : near
EXTRN _StopAdlib : near
EXTRN _AdlibState : byte
.model small
.stack
.386
.data
FileName db 14 dup(0)
fhandle dw 0
WorkBuffer db 522h dup(?)
ModBase label byte
db 50000 dup(?)
;####### CODE #########
.code
maincode:
mov ax,@data
mov ds,ax
mov bx,82h
mov di,offset FileName
fnam_loop:
mov cl,es:[bx]
cmp cl,0Dh
jz fnam_eos
cmp cl,20h
jz fnam_eos
or cl,cl
jz fnam_eos
mov ds:[di],cl
inc di
inc bx
cmp bx,82h+12
jb fnam_loop
fnam_eos:
mov es,ax
;------ Load the mod
mov ax,3D00h
mov dx,offset FileName
xor cl,cl
int 21h
jc LoadError
mov [fhandle],ax
mov ah,3Fh
mov bx,[fhandle]
mov cx,50000
mov dx,offset ModBase
int 21h
mov ah,3Eh
mov bx,[fhandle]
int 21h
;------ Init the mod!!!
mov si,offset ModBase
mov di,offset WorkBuffer
xor al,al ;0=irq_mode 1=polling_mode
call _InitAdlib
cmp cs:[_AdlibState],0
jz LoadError ;No adlib present!?
PlayLoop: ;*** MAINLOOP *****
in al,60h
dec al
jnz short PlayLoop
;------ Fuck off!!!
call _StopAdlib
LoadError:
mov ah,04Ch ;BYE
int 21h
end maincode